import request from '@/utils/request'


  //角色列表
  export function rolelist(query) {
    return request({
      url: '/admin/adminrolelist',
      method: 'get',
      params: query
    })
  }

  //添加角色
  export function roleadd(data) {
    return request({
      url: '/admin/adminroleadd',
      method: 'post',
      data
    })
  }

  //编辑角色
  export function roleedit(data) {
    return request({
      url: '/admin/adminroleedit',
      method: 'post',
      data
    })
  }

  //删除角色
  export function roledel(data) {
    return request({
      url: '/admin/adminroledel',
      method: 'post',
      data
    })
  }

  //权限列表
  export function authlist(query) {
    return request({
      url: '/admin/adminauthlist',
      method: 'get',
      params: query
    })
  }

  //保存权限
  export function authsave(data) {
    return request({
      url: '/admin/authsave',
      method: 'post',
      data
    })
  }

  //权限添加
  export function authadd(data) {
    return request({
      url: '/admin/authadd',
      method: 'post',
      data
    })
  }

  //列表权限添加
  export function authaddnew(data) {
    return request({
      url: '/admin/authaddNew',
      method: 'post',
      data
    })
  }

  //权限编辑
  export function authedit(data) {
    return request({
      url: '/admin/authedit',
      method: 'post',
      data
    })
  }

  //删除权限
  export function authdel(data) {
    return request({
      url: '/admin/authdel',
      method: 'post',
      data
    })
  }

  //权限排序
  export function authsortsave(data) {
    return request({
      url: '/admin/authsortsave',
      method: 'post',
      data
    })
  }


  //管理员列表
  export function managerlist(query) {
    return request({
      url: '/admin/managerlist',
      method: 'get',
      params: query
    })
  }

  //管理员添加
  export function manageradd(data) {
    return request({
      url: '/admin/manageradd',
      method: 'post',
      data
    })
  }

  //管理员编辑
  export function manageredit(data) {
    return request({
      url: '/admin/manageredit',
      method: 'post',
      data
    })
  }

  //管理员删除
  export function managerdel(data) {
    return request({
      url: '/admin/managerdel',
      method: 'post',
      data
    })
  }
